package Temp.杂乱无章;

public class 九进制转十 {
    public static void main(String[] args) {
        String a = "2022";
        int sum = 0;

        for (int i = 0; i < a.length(); i++)
            sum = sum * 9 + a.charAt(i) - '0';
        System.out.println(sum);
        }
}
